Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Créer un script pour supprimer des références dans "snapshot" de la table "knowledge-element-snapshots" (PIX-15756) #11231

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

lionelB
Copy link
Member

@lionelB lionelB commented Jan 27, 2025

🥞 Problème

Dans le cadre de la mise en conformité RGPD, on souhaite supprimer les références à userId / assessmentId dans le champ jsonbsnapshot

🥓 Proposition

Faire un script qui supprime les données déjà présentes.

🧃 Remarques

Il faudra faire une 2ieme PR pour arréter d'enregistrer ces données dans les snapshot

😋 Pour tester

  • se connecter sur le postgres avec le CLI scalingo scalingo -a pix-api-review-prxxx pgsql-console
  • lister le contenu des ke select snapshot from "knowledge-element-snapshots"
  • voir les références à userId assessmentId
  • lancer le script en RA avec le CLI scalingo scalingo -a pix-api-review-prxxx run "node scripts/prod/clean-ke-snapshots.js"
  • voir qu'on a plus de références à userId assessmentId select snapshot from "knowledge-element-snapshots"

@pix-bot-github
Copy link

Une fois les applications déployées, elles seront accessibles via les liens suivants :

Les variables d'environnement seront accessibles via les liens suivants :

@lionelB lionelB force-pushed the pix-15756/purge-ke-snapshot branch from aa9979d to 0a8d8bb Compare January 28, 2025 07:44
@lionelB lionelB marked this pull request as ready for review January 28, 2025 08:04
@Alexandre-Monney Alexandre-Monney changed the title feat(api): add a script to clean knowledge-element-snapshots [FEATURE] Créer un script pour supprimer des références dans "snapshot" de la table "knowledge-element-snapshots" (PIX-15756) Jan 28, 2025
api/scripts/prod/clean-ke-snapshots.js Outdated Show resolved Hide resolved
api/scripts/prod/clean-ke-snapshots.js Outdated Show resolved Hide resolved
api/scripts/prod/clean-ke-snapshots.js Outdated Show resolved Hide resolved
api/scripts/prod/clean-ke-snapshots.js Show resolved Hide resolved
api/scripts/prod/clean-ke-snapshots.js Show resolved Hide resolved
alicegoarnisson

This comment was marked as outdated.

@alicegoarnisson alicegoarnisson added the team-captains This is your captain speaking label Jan 29, 2025
@lionelB lionelB requested a review from a team January 29, 2025 08:54
@lionelB lionelB force-pushed the pix-15756/purge-ke-snapshot branch 2 times, most recently from 95292f4 to 95a6177 Compare January 29, 2025 09:17
@HEYGUL
Copy link
Contributor

HEYGUL commented Jan 30, 2025

Je rebondis sur la remarque (Il faudra faire une 2ieme PR pour arréter d'enregistrer ces données dans les snapshot) : ne devrait-on pas d'abord arrêter d'enregistrer avant de nettoyer les données ?

@lionelB
Copy link
Member Author

lionelB commented Jan 30, 2025

@HEYGUL oui c'est ce qu'il faut qu'on fasse avant pour éviter de relancer plusieurs le script.

@lionelB lionelB added ⚠️ Blocked ⚠️ PR Inheritance This PR inherits a first-to-merge PR and will need a rebase Tech Review OK and removed 👀 Tech Review Needed labels Feb 5, 2025
@lionelB lionelB force-pushed the pix-15756/purge-ke-snapshot branch from 95a6177 to c8dc893 Compare February 5, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 Func Review Needed Need PO validation for this functionally team-captains This is your captain speaking team-prescription Tech Review OK ⚠️ Blocked ⚠️ PR Inheritance This PR inherits a first-to-merge PR and will need a rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants